<template>
  <!-- 物流往来对账 -->
  <div class="basic_info">
    <div class="info_operation_btn">
      <div class="btn_left">
        <el-button @click="checkBill" style="width: 80px">查看单据</el-button>
        <!-- <el-button @click="" style="width: 80px">导出</el-button> -->
        <el-button
          style="width: 80px"
          :disabled="!buttonsPermissions.DaYin"
          :class="!buttonsPermissions.DaYin ? 'disabled_button' : ''"
          @click="handleShortcutKeyPrint"
          >打印(P)</el-button
        >
        <el-checkbox style="margin-left: 8px; margin-right: 8px" v-model="queryData.hideRedRush" @change="onQuery"
          >隐藏红冲单据</el-checkbox>
      </div>
      <div class="btn_right">
        <el-input v-model="queryData.searchValue" placeholder="请输入单据编号\物流公司名称\关键字搜索" />
        <el-button type="primary" @click="onQuery">搜索</el-button>
        <!-- <el-button @click="onRefresh">刷新</el-button> -->
        <i @click="onShowColumn()" class="set_up el-icon-s-tools"></i>
      </div>
    </div>
    <div class="info_content_div" ref="contentView">
      <div ref="searchView">
        <div class="div_screen">
          <div class="screen_left">
            <div class="custom_item">
              <div class="item_title">物流公司</div>
              <xghSelect
                ref="wuliugongsi"
                class="custom_select_head"
                filterable
                clearable
                v-model="queryData.logisticsId"
                activeKey="expressName"
                :reqData="{ url: '/xghExpress/xghExpress/listNoPage' }"
              />
            </div>
            <!-- 经手人 -->
            <div class="custom_item">
              <div class="item_title">经手人</div>
              <div class="custom_select_head">
                <xghSelect
                  ref="jingshouren"
                  class="custom_select_head"
                  filterable
                  clearable
                  v-model="queryData.handledBy"
                  activeKey="realname"
                  :reqData="{ url: '/dept/xghAccountBookDept/getAllDeptUsers' }"
                />
              </div>
            </div>
            <div class="custom_item">
              <div class="item_title">物流单号</div>
              <div class="custom_select_head">
                <el-input ref="wuliudanhao" v-model="queryData.logisticsNumber"></el-input>
              </div>
            </div>
            <div class="custom_item">
              <div class="item_title">过滤记录</div>
              <div class="custom_select_head">
                <el-select placeholder v-model="queryData.isAllShow">
                  <el-option
                  ref="guolvjilu"
                    style="font-size: 12px;height: 28px;"
                    v-for="item in gljlOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </div>
            </div>
          </div>
          <div class="screen_right">
            <el-select @change="changeDate" v-model="monthValue">
              <el-option v-for="item in monthOptions" :key="item" :label="item" :value="item"></el-option>
            </el-select>
            <el-date-picker
              v-model="nowDate"
              type="daterange"
              range-separator="~"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              @change="onClickPicker"
              value-format="yyyy-MM-dd"
            ></el-date-picker>
            <el-button type="primary" @click="onQuery">查询</el-button>
            <el-button plain @click="reset" style="border: 1px solid #dcdfe6 !important">重置</el-button>
          </div>
        </div>
        <div class="div_screen">
          <div class="screen_left">
            <div class="custom_item2">
              <div class="item_title">此前应收款：</div>
              <div class="item_content number">¥{{ $formatMoney(totalPrice.receivablePrice || '0')  }}</div>
            </div>
            <div class="custom_item2">
              <div class="item_title">此前应付款：</div>
              <div class="item_content number">¥{{ $formatMoney( totalPrice.payPrice || '0') }}</div>
            </div>
            <div class="custom_item2">
              <div class="item_title">此前余额：</div>
              <div class="item_content number" style="color: #fd6c21">¥{{ $formatMoney(totalPrice.balance || '0') }}</div>
            </div>
          </div>
        </div>
      </div>
      <div class="div_table" :style="{ height: searchHeight + 'px' }">
        <div class="table_content">
          <el-table
            ref="tableRef"
            show-summary
            :summary-method="getSummaries"
            highlight-current-row
            :header-cell-style="{
              color: '#666666',
              textAlign: 'center',
              height: '30px',
              borderColor: '#dddddd',
            }"
            :data="tableData.records"
            height="100%"
            @sort-change="changeSort"
            @row-click="onClickRow"
            @row-dblclick="handleRowDbclick"
            :row-style="rowClass"
          >
            <!-- <el-table-column type="selection"></el-table-column> -->
            <el-table-column :resizable="false" label="序号" type="index" width="50"></el-table-column>
            <template v-for="(item, index) in columnData">
              <el-table-column
                :show-overflow-tooltip="true"
                :key="index"
                :label="item.zidingyiName ? item.zidingyiName : item.morenName"
                v-if="item.zidingyiState"
                :prop="item.props"
                min-width="150px"
                :sortable="item.sortable"
                :width="(['createTime', 'orderNumber'].includes(item.props) || index == 1) ? '170px' : (item.props == 'xh' ? '50px' : '')"
              >
                <template slot-scope="scope">
                  <span
                    v-if="['payPrice', 'paySettlementPrice', 'receivePrice', 'receiveSettlementPrice', 'balance'].includes(item.props)"
                  >
                    {{ $formatMoney(scope.row[item.props]) }}
                  </span>
                  <span  v-else-if="item.props == 'reconciliationFlag'" style="text-align: center;  width:100%;">
                    <el-checkbox
                    v-model="scope.row.reconciliationFlag"
                    @change="billReconciliation(scope.row, scope.$index)"
                  ></el-checkbox>
                  </span>
                  
                  <span v-else>{{ scope.row[item.props] }}</span>
                </template>
              </el-table-column>
            </template>
          </el-table>
        </div>
        <div class="table_pagination">
          <div class="pagination_div">
            <el-pagination
              background
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :current-page="currentPage"
              :page-sizes="[20, 50, 100, 200]"
              :page-size="pagesize"
              layout="jumper, prev, pager,next, sizes"
              :total="tableData.total"
            ></el-pagination>
          </div>
        </div>
      </div>
    </div>
    <!-- 列配置弹框 -->
    <CConfiguration
      ref="setColumnRef"
      :columnDataArr="columnData"
      :defaultColumnDataArr="defaultColumnData"
      orderType="物流往来对账"
      @onSaveColumn="onSaveColumn"
    ></CConfiguration>
    <!-- 打印 -->
    <dialog-print ref="print"></dialog-print>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import CConfiguration from '@/components/c_column/columnConfiguration1'
/**打印 */
import dialogPrint from '@/views/components/dialogPrintStatic'
import { getAction, postAction } from '@/api/manage'
import { delcommafy, formatMoney } from '../../../utils'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
// 导入调用处理权限数据方法
import { handlePermissions, handleOtherPerms } from '@/utils/index'
import xghSelect from '@/components/xghSelect'
import Vue from 'vue'
import { USER_INFO, ACCOUNT_BOOK } from '@/store/mutation-types'
export default {
  name: 'logisticsReconciliation',
  mixins: [JeecgListMixin],
  components: {
    CConfiguration,
    dialogPrint,
    xghSelect,
  },
  computed: {
    ...mapGetters(['name']),
    buttonsPermissions() {
      return handlePermissions('物流往来对账')
    },
    printPermissions() {
      return handleOtherPerms('单据可多次打印')
    },
  },
  created() {
    this.getData()
    this.getTableData() // 获取表格信息数据
    
    this.$nextTick(() => {
      const contentView = this.$refs.contentView.clientHeight
      const divHeight = this.$refs.searchView.clientHeight
      this.searchHeight = contentView - divHeight - 20
    })
  },
  mounted() {
    this.$nextTick(() => {
      const contentView = this.$refs.contentView.clientHeight
      const divHeight = this.$refs.searchView.clientHeight
      this.searchHeight = contentView - divHeight - 60
    })
  },
  updated() {
    this.$nextTick(() => {
      this.$refs['tableRef'].doLayout()
    })
  },
  data() {
    return {
      orderData: [], // 传递给生成销售单的数据
      searchHeight: 800,
      userInfo: Vue.ls.get(USER_INFO),
      // 统计类型
      gljlOptions: [
        {
          value: undefined,
          label: '全部显示',
        },
        {
          value: '1',
          label: '只显示已对账',
        },
        {
          value: '0',
          label: '只显示未对账',
        },
      ],
      // 查询条件数据
      queryData: {
        hideRedRush: false,
        handledBy: '', // 经手人id
        startTime: '', // 开始时间
        endTime: '', //结束时间
        logisticsId: '', //物流公司
        logisticsNumber: '', //物流单号
        isAllShow: undefined, //全部显示
        searchValue: '',
      },
      activeBill: {}, //单选单据信息
      // 月份选择
      monthValue: '本月',
      monthOptions: ['今日', '本周', '本月', '本年'],
      nowDate: [],
      totalPrice: {},
      // 表格数据
      tableData: {},
      // 列配置数据
      defaultColumnData: [],
      columnData: [
        {
          morenName: '发生日期',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          props: 'createTime',
        },
        {
          morenName: '单据类型',
          zidingyiName: '',
          morenState: false,
          zidingyiState: true,
          props: 'orderType_dictText',
        },
        {
          morenName: '单据编号',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          props: 'orderNumber',
        },
        {
          morenName: '往来单位',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          props: 'companyName',
        },
        {
          morenName: '物流公司',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          props: 'expressName',
        },
        {
          morenName: '经手人',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          props: 'handledBy_dictText',
        },
        {
          morenName: '应收发生额',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          props: 'receivePrice',
        },
        {
          morenName: '应收余额',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          props: 'receiveSettlementPrice',
        },
        {
          morenName: '应付发生额',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          props: 'payPrice',
        },
        {
          morenName: '应付余额',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          props: 'paySettlementPrice',
        },
        {
          morenName: '核销后余额',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          props: 'balance',
        },
        {
          morenName: '对账标记',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          props: 'reconciliationFlag',
        },
        {
          morenName: '对账日期',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          props: 'reconciliationDate',
        },
        {
          morenName: '对账人',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          props: 'reconciliationBy_dictText',
        },
        {
          morenName: '单据状态',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          props: 'status_dictText',
        },
        {
          morenName: '备注',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          props: 'remark',
        },
        {
          morenName: '摘要',
          zidingyiName: '',
          morenState: true,
          zidingyiState: true,
          props: 'summary',
        },
      ],
      pagesize: 20, //每页的数据条数
      currentPage: 1, //默认开始页面
      updateId: '', // 修改列配置时返回的id

      url: {
        listUrl: '/xghCollectionPay/xghCollectionPay/queryLogisticsVerify',
        api: '物流往来对账',
        exportXlsUrl: '/xghPurchaseOrder/xghPurchaseOrder/exportPurchaseCountXls',
      },
      billName: '物流往来对账',
    }
  },
  mounted() {
    this.selectTitle()
  },
  methods: {
    // 打印
    async handleShortcutKeyPrint() {
      let data = {
        ...this.queryData,
        pageSize: 1000000,
        pageNo: 1,
      }
      let printExclusive = []
      const res = await postAction(this.url.listUrl, data)
      if (res.code !== 200) {
        return this.$elMessage.error('获取数据失败！')
      }
      printExclusive = (res.result.records || []).map(item => {
        item.reconciliationFlag = item.reconciliationFlag == '1' ? '已对账' : '未对账'
        item.balance = formatMoney(item.balance)
        item.payPrice = formatMoney(item.payPrice)
        item.receivePrice = formatMoney(item.receivePrice)
        item.paySettlementPrice = formatMoney(item.paySettlementPrice)
        item.receiveSettlementPrice = formatMoney(item.receiveSettlementPrice)
        return item
      })
      this.onQuery()
      this.handlePrint(printExclusive)
    },
    handlePrint(printExclusive) {
      if (!this.buttonsPermissions.DaYin) {
        this.$elMessage.warning('未拥有打印权限！')
      } else if (!printExclusive || printExclusive.length <= 0) {
        this.$elMessage.warning('没有要打印的记录！')
      } else {
        let label = '全部显示'
          if (this.queryData.isAllShow == '1') {
            label = '只显示已对账'
          } else if (this.queryData.isAllShow == '0'){
            label = '只显示未对账'
          }
        
        let printData = {
          riqi: this.queryData.startTime + '~' + this.queryData.endTime,
          wuliugongsi: this.$refs.wuliugongsi.$refs.xghSelect.selected.label,
          jingshouren: this.$refs.jingshouren.$refs.xghSelect.selected.label,
          wuliudanhao: this.queryData.wldh,
          guolvjilu: label,
          printExclusive,
        }
        // 可以多次打印设置
        if (this.printPermissions) {
          console.log(510000)
          this.$refs.print.show(printData, this.columnData, this.billName)
        } else {
          console.log(51222)
          if (this.$lcStorage.get('printLimitValue')) {
            // 获取打印次数
            this.getPrintNum(this.billName, () => {
              this.$refs.print.show(printData, this.columnData, this.billName)
            })
          } else {
            this.$refs.print.show(printData, this.columnData, this.billName)
          }
        }
      }
    },
    billReconciliation (row, index) {
      let params = {
        collectionPayId: row.collectionPayId,
        reconciliationBy: this.userInfo.id,
        reconciliationFlag: row.reconciliationFlag ? '1' : '0'
      }
      console.log(params);
      getAction('/xghCollectionPay/xghCollectionPay/reconciliation', params).then(res => {
        if (res.success) {
          let result = res.result
          let item = this.tableData.records[index]
          item.reconciliationBy = result.reconciliationBy
          item.reconciliationBy_dictText = result.reconciliationBy_dictText
          item.reconciliationDate = result.reconciliationDate
        } else {
          this.$elMessage.error(res.message)
        }
      })
    },
    checkBill() {
      if (this.activeBill.orderId) {
        this.$toBillDetail(this, this.activeBill.orderType, this.activeBill.orderId)
      } else {
        this.$elMessage.warning('请先选择要查看的单据！')
      }
    },
    // 选中当前行
    onClickRow(row) {
      this.activeBill = row
    },
    // 双击列表
    handleRowDbclick(row) {
      this.$toBillDetail(this, row.orderType, row.orderId)
    },
    // 设置主表行颜色
    rowClass(scope) {
      // console.log(row)
      if (scope.row.reconciliationFlag || scope.row.status == '20') {
        return { color: '#f5222d' }
      } else {
        return { color: '#666666' }
      }
    },
    // 初始化获取数据
    getData() {
      this.getTimeRange(this.$setTimeRange(5)) // 默认获取当月时间
      this.selectTitle()
    },
    // 初始化查询列配置值
    async selectTitle() {
      let obj = await this.$setColumn.selectColumn(this.url.api)
      if (obj.code === 200) {
        this.updateId = obj.updateId
        this.columnData = obj.columnData
      } else if (obj.code === 500) {
        let id = await this.$setColumn.addColumn(this.url.api, this.columnData, 0, this.updateId)
        this.updateId = id
      }
    },
    // 修改列配置后保存修改后的值
    async onSaveColumn(value) {
      this.columnData = value
      let res = await this.$setColumn.editColumn(this.url.api, this.columnData, this.updateId)
      if (res.code == 200) {
        this.$elMessage.success(res.message)
      } else {
        this.$elMessage.error(res.message)
      }
    },
    // 触发列配置弹框
    onShowColumn() {
      this.defaultColumnData = this.$options.data().columnData
      this.$refs.setColumnRef.dialogVisible = true
    },
    // 获取表格信息数据
    async getTableData(page) {
      let data = {
        ...this.queryData,
        pageSize: this.pagesize,
        pageNo: page || 1,
      }
      postAction('/xghCollectionPay/xghCollectionPay/queryHistoryLogisticsSum', data).then(res => {
        if (res.code == 200) {
          this.totalPrice = res.result || {}
        } else {
          this.$elMessage.error(res.message)
        }
      })

      //列表数据
      const res = await postAction(this.url.listUrl, data)
      if (res.code == 200) {
        this.tableData = res.result
        let list = this.tableData.records || []
        list.forEach((item, index) => {
            item.reconciliationFlag = item.reconciliationFlag == 1
          })
      } else {
        this.$elMessage.error('获取数据失败！')
      }
    },
    // 查询
    onQuery() {
      this.getTableData()
    },
    reset() {
      this.queryData = this.$options.data().queryData
      this.getTimeRange(this.$setTimeRange(5))
      this.getTableData()
    },
    // 刷新
    onRefresh() {
      Object.assign(this.$data, this.$options.data())
      this.getData()
    },
    // 判断当前选择时间段
    changeDate(val) {
      switch (val) {
        case '全部':
          this.queryData.startTime = ''
          this.queryData.endTime = ''
          break
        case '今日':
          this.getTimeRange(this.$setTimeRange(1))
          break
        case '昨天':
          this.getTimeRange(this.$setTimeRange(2))
          break
        case '本周':
          this.getTimeRange(this.$setTimeRange(3))
          break
        case '上周':
          this.getTimeRange(this.$setTimeRange(4))
          break
        case '本月':
          this.getTimeRange(this.$setTimeRange(5))
          break
        case '上月':
          this.getTimeRange(this.$setTimeRange(6))
          break
        case '本年':
          this.getTimeRange(this.$setTimeRange(7))
          break
        case '去年':
          this.getTimeRange(this.$setTimeRange(8))
          break
        default:
          break
      }
    },
    // 获取时间范围并设置
    getTimeRange(data) {
      this.nowDate = [data.now, data.end]
      this.queryData.startTime = data.now
      this.queryData.endTime = data.end
    },
    // 获取当前选中时间
    onClickPicker(val) {
      this.queryData.startTime = val[0]
      this.queryData.endTime = val[1]
    },
    // 合计列计算
    getSummaries(param) {
      const { columns, data } = param
      const sums = []
      columns.forEach((column, index) => {
        if (index === 0) {
          sums[index] = '合计'
        } else if (index === 1) {
          sums[index] = '共' + this.tableData.total + '条明细'
        } else if (['payPrice', 'receivePrice', 'balance'].includes(column.property)) {
          const values = data.map((item) => delcommafy(item[column.property]))
          if (!values.every((value) => isNaN(value))) {
            sums[index] = values.reduce((prev, curr) => {
              const value = delcommafy(curr)
              if (!isNaN(value)) {
                return prev + curr
              } else {
                return prev
              }
            }, 0)
            sums[index] = this.$formatMoney(sums[index])
          }
        } else {
          sums[index] = ''
        }
      })
      return sums
    },
    // 获取每页几条数据
    handleSizeChange(val) {
      this.pagesize = val
      this.getTableData()
    },
    // 获取当前第几页
    handleCurrentChange(val) {
      this.currentPage = val
      this.getTableData(val)
    },
    // 数据排序，传入列名和排序方式
    changeSort(val) {
      this.queryData.sortName = val.prop // 排序参数
      this.queryData.isSort = val.order // ascending == 1正序  descending == 2 倒序
      this.getTableData()
    },
    // 导出
    exportExcel () {
      let fileName = '物流往来对账'
      let queryParam = {
        ...this.queryData,
        fileName: fileName,
      }
      this.handleExportXlsByStaff(fileName, queryParam)
    },
  },
}
</script>

<style lang="scss" scoped>
@import './index.scss';
.basic_info {
  width: 100%;
  height: calc(100vh - 102px);
  background: #f0f2f5;
  box-sizing: border-box;
  padding: 0 0.168761rem 0.168761rem;
  display: flex;
  flex-direction: column;
}

.number {
  font-family: PingFang SC, PingFang SC;
  font-weight: 600;
  font-size: 24px;
  color: #666666;
}
.info_content_div {
  width: 100%;
  height: calc(100% - 60px);
  background: #fff;
  box-sizing: border-box;
  padding: 10px;
  display: flex;
  flex-direction: column;

  .div_screen {
    width: 100%;
    // height: 50px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;

    .screen_left {
      font-size: 12px;
      box-sizing: border-box;
      display: flex;
      justify-content: flex-start;
      flex-wrap: wrap;
      min-width: 600px;
    }

    .screen_right {
      margin-right: 20px;
      box-sizing: border-box;
      display: flex;
      justify-content: flex-end;
      align-items: center;
      box-sizing: border-box;

      ::v-deep .el-button {
        // width: 60px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        border-radius: 5px;
        border: none;
      }

      ::v-deep .el-select {
        width: 80px;
        margin: 0 10px;

        .el-input {
          .el-input__inner {
            height: 30px;
            border-color: #e3e3e3;
            font-size: 12px;
            padding-left: 5px;
          }

          .el-input__suffix {
            height: 30px;
            display: flex;
            align-items: center;
          }
        }
      }

      ::v-deep .el-date-editor {
        width: 220px;
        height: 30px;
        background: #ffffff;
        border: 1px solid #d9d9d9;
        margin-right: 0.112507rem;
        padding: 3px 6px;

        .el-range__icon {
          position: absolute;
          right: 0;
          line-height: 30px;
        }

        .el-range-separator {
          line-height: 24px;
        }

        .el-range-input {
          font-size: 12px;
        }

        .el-range__close-icon {
          display: none;
        }
      }
    }
  }

  .div_table {
    width: 100%;
    // height: 100%;
    // display: flex;
    // flex-direction: column;
    // justify-content: space-between;
    // transition: all 0.3s;

    .table_content {
      height: calc(100% - 50px);

      ::v-deep .el-table {
        border: 1px solid #e3e3e3;
        border-bottom: none;
        box-sizing: border-box;
        height: 100%;

        th,
        td {
          padding: 0;
          box-sizing: border-box;
          border-right: 1px solid #e3e3e3;

          .cell {
            min-height: 30px;
            display: flex;
            align-items: center;
            font-size: 12px;
          }

          &:first-child {
            .cell {
              justify-content: center;
              padding: 0;
            }
          }

          &:nth-child(2) {
            .cell {
              justify-content: center;
            }
          }

          &:last-child {
            .cell {
              justify-content: center;
            }
          }
        }

        th {
          .cell {
            // background: #ededed;
            justify-content: center;
          }
        }

        .el-checkbox {
          .is-indeterminate {
            .el-checkbox__inner {
              color: #1b93f9;
              background-color: #1b93f9;
              border-color: #1b93f9;
            }
          }
        }

        .el-icon-edit-outline {
          font-size: 0.25rem;
          color: #1b93f9;
          margin-right: 0.037502rem;
        }

        .el-icon-delete {
          font-size: 0.25rem;
          color: #ff2626;
          margin-left: 0.037502rem;
        }

        .el-table__body tr:hover > td {
          background: #e3f6ff;
        }

        .el-table__footer-wrapper {
          td {
            background: #f4f4f4;
            border: none;
          }
        }

        .el-table__header {
          tr {
            &:last-child {
              th {
                background: rgb(237, 237, 237) !important;
              }
            }
          }
        }

        //滚动条的宽度
        ::-webkit-scrollbar {
          width: 8px;
          height: 10px;
          background-color: #e5e5e5;
        }

        //滚动条的滑块
        ::-webkit-scrollbar-thumb {
          background-color: #c9c9c9;
        }
      }
    }

    .table_pagination {
      .total {
        margin-top: 0.25rem;
        width: 3.750234rem;
        font-size: 12px;
        color: #666666;
      }

      width: 100%;
      height: 50px;
      box-sizing: border-box;
      padding: 10px 0;
      display: flex;

      .pagination_div {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-end;

        ::v-deep .el-pagination {
          padding: 0;
          height: 30px;

          .el-pagination__sizes {
            margin: 0;

            .el-input {
              margin-right: 0;
            }
          }
        }
      }
    }
  }
}

.custom_item {
  display: flex;
  align-items: center;
  margin: 10px 10px 10px 0;
  width: 180px;
  font-size: 12px;
}
.custom_item2 {
  display: flex;
  align-items: center;
  margin: 10px 10px 10px 0;
  font-size: 12px;
}

.item_title {
  padding: 0 5px;
  width: auto;
  min-width: 60px;
  line-height: 30px;
  color: #666666;
  text-justify: distribute-all-lines;
  /*ie6-8*/
  text-align-last: justify;
  /* ie9*/
  -moz-text-align-last: justify;
  /*ff*/
  -webkit-text-align-last: justify;
  /*chrome 20+*/
}

.custom_select_head {
  flex: 1;
  height: 30px;
  position: relative;

  ::v-deep .el-select {
    .el-input {
      .el-input__inner {
        height: 30px;
        border-color: #e3e3e3;
        font-size: 12px;
        padding-left: 5px;
      }

      .el-input__suffix {
        height: 30px;
        display: flex;
        align-items: center;
      }
    }
  }

  ::v-deep .el-input {
    width: 100%;

    .el-input__inner {
      height: 30px;
      border-color: #e3e3e3;
      font-size: 12px;
      padding-left: 5px;
    }

    .el-input__suffix {
      height: 30px;
      display: flex;
      align-items: center;
    }
  }
}

.custom_more {
  position: absolute;
  right: 10px;
  z-index: 10;
  top: 1px;
  background: #fff;
  height: 28px;
  display: flex;
  align-items: center;
  color: #bfbfbf;
}

.custom_add {
  display: flex;
  justify-content: center;
  align-items: center;

  span {
    margin-left: 5px;
    color: #666666;
  }

  i {
    color: #666666;
  }
}

.disabled_button {
  background: #cbced3 !important;
  color: #666 !important;
}
</style>

